#!/bin/bash

echo "Sto creando tutte le immagini...."

for file in `ls ${1}graph*`
do 

#echo $file
#echo "${1}Inf${file:12}"

/usr/bin/gnuplot <<EOF

set terminal png
set output "gImgs${file:6}.png"
set xrange [0:1]
set yrange [0:1]
plot "$file" notitle w linespoints, "${1}infect${file:12}" notitle w points pt 7 lt -1

EOF



done

echo "ho finito!"
